/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-content {
    padding: 2rem;
    flex: 1;
}

/* 视频容器样式 */
.video-container {
    position: relative;
    width: 100%;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#video, #canvas {
    width: 100%;
    height: auto;
    max-height: 70vh;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* 覆盖层样式 */
.overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: center;
}

.gesture-box {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    min-width: 200px;
}

#gesture-text {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* 置信度条样式 */
.confidence-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.confidence-level {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
}

/* 结果卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.card-header {
    border-bottom: none;
    border-radius: 10px 10px 0 0 !important;
}

.result-container {
    text-align: center;
    padding: 1rem;
}

#result {
    color: #2196F3;
    margin-bottom: 0.5rem;
}

#confidence {
    color: #666;
    margin: 0;
}

/* 手势历史样式 */
.gesture-history {
    margin-top: 1rem;
}

.gesture-history h5 {
    color: #333;
    margin-bottom: 1rem;
}

.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border: none;
    border-bottom: 1px solid #eee;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* 可识别手语列表样式 */
.gesture-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* 页脚样式 */
.footer {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

/* 动画效果 */
.gesture-box.active {
    animation: pulse 1s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 通用样式 */
body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 登录页面样式 */
.form-signin {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}

.form-signin .form-floating:focus-within {
    z-index: 2;
}

.form-signin input[type="text"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

#alertPlaceholder {
    margin-top: 1rem;
}

/* 登录容器样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 2.5rem;
    color: #0d6efd;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand i {
    margin-right: 0.5rem;
    color: #4a69bd;
}

/* 内容页面样式 */
.content-page {
    display: none;
    padding: 20px 0;
}

.content-page.active {
    display: block;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* 手语参考页面样式 */
.list-group-item {
    cursor: pointer;
    border-left: 3px solid transparent;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    border-left-color: #4a69bd;
}

.list-group-item.active {
    background-color: #4a69bd;
    border-color: #4a69bd;
}

/* 手语卡片样式 */
.sign-card {
    margin-bottom: 1.5rem;
}

.sign-card .card-title {
    color: #4a69bd;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.sign-video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn-primary {
    background-color: #4a69bd;
    border-color: #4a69bd;
}

.btn-primary:hover {
    background-color: #3c5aa9;
    border-color: #3c5aa9;
}

/* 收藏按钮样式 */
.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.favorite-btn i {
    color: #dc3545;
}

/* 语音识别按钮动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.recording {
    animation: pulse 1.5s infinite;
    background-color: #dc3545 !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .content-page {
        padding: 10px 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
} 